Links
The layering of the C4 model enables the creation of clear and understandable diagrams. Moreover, you will often create diagrams focusing on specific systems, which, in turn, integrate with other systems.
By linking diagrams of different levels or systems together, you will enable interactive navigation that allows users to have a clear and detailed view of your architectures.
Mina also supports dynamic external links, allowing you to connect your diagrams to external URLs while dynamically passing architectural component variables, such as their aliases.
Usage
Keadex Mina leverages the $link property supported by the C4-PlantUML (opens in a new tab) syntax to define links between a diagram element and a diagram or external services.
The $link property consists of one or more links separated by a semicolon (;).
Types of links
Each link can be one of the following:
- Internal: Internal links follow the format
DIAGRAM_TYPE/DIAGRAM_NAME, whereDIAGRAM_TYPEandDIAGRAM_NAMErepresent the type and name of the linked diagram, both in lower and dash-case. Only one internal link is allowed. - External: Only
httpandhttpslinks are permitted. You can also create dynamic external links by including variables that Mina substitutes at runtime. For instance, in the linkhttps://keadex.dev/<ALIAS>, the<ALIAS>variable is replaced at runtime with the alias of the diagram element. To see the full list of available variables, refer to this document. Multiple external links are allowed.
Allowed links
It is possible to add links only to the following C4 element types:
- Software Systems
- Containers
- Components
Creating links
- Place the cursor at the line of the code editor containing the element to link
- You have two options:
- Right mouse click -> "Link to..."
- Click on the icon
- Fill in the link fields
- Click on the "Confirm" button
- Mina will add for you the
$linkproperty with the auto-generated value - Save the diagram
Updating/Deleting links
- Place the cursor at the line of the code editor containing the element to link
- You have two options:
- Right mouse click -> "Link to..."
- Click on the icon
- Update or remove the links:
- Clear the diagram link field and select "Unlink..." to remove the diagram link.
- Delete any external links you wish to remove.
- Click on the "Confirm" button
- Mina will remove for you the
$linkproperty - Save the diagram
